package com.sylli.oeuf.server.util;

import java.io.File;


public class GeneratorUtil {
	
	public static long generateAuthenKey(long client_id) {
		long val = (long) (System.currentTimeMillis() - client_id + (Math.random() * 1000));
		return val;
	}
	
	public static File getCoreStreamPath() {
		File f = new File("webapps/core/streams/");
		if (!f.exists()) {
			f.mkdirs();
		}
		return f; 
	}
	
	public static File getCorePath(String targetFile) {
		return new File("webapps/core/", targetFile);
	}

	public static File getRootResourcesPath() {
		File f = new File("webapps/root/resources/");
		if (!f.exists()) {
			f.mkdirs();
		}
		return f; 
	}
	
	public static File getRootPath() {
		return new File("webapps/root/");
	}
	
}
